package com.sugree.jibjib.data;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.sugree.jibjib.data.Tweet;
import com.sugree.jibjib.R;

public class PagedArrayAdapter extends ArrayAdapter<Tweet> {
	private int mLayout;
	private List<Tweet> mItems;
	private LayoutInflater mInflater;

	public PagedArrayAdapter(Context context, int layout, List<Tweet> items) {
		super(context, 0, items);

		mLayout = layout;
		mInflater = LayoutInflater.from(context);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		ViewHolder holder = null;
		if (view == null) {
			view = mInflater.inflate(mLayout, null);

			holder = new ViewHolder();
			holder.text = (TextView)view.findViewById(R.id.tweet_message);

			view.setTag(holder);
		}

		return null;
	}

	static class ViewHolder {
		TextView text;
	}
}
